package com.xuecheng.web.exception;

import com.xuecheng.commons.enums.ErrorCode;
import lombok.Data;

//自定义异常
@Data
public class BusinessException extends RuntimeException {

    //错误信息对象
    private ErrorCode code;

    public BusinessException (ErrorCode code) {
        super(code.getDesc());
        this.code = code;
    }
}
